<div class="titulos">Usuários do Sistema :: Inserir</div>
<div class="usuarios form">

    <?php echo $this->Form->create('Usuario'); ?>
    <table id="tabela_mvc">
        <input type="hidden" id="UsuarioId" value="<?php echo $this->data['Usuario']['id']; ?>" name="data[Usuario][id]"/>
        <tr>
            <th>Usuário: </th>
            <td><input type="text" class="validateRequired" id="Usuario" size="30" maxlength="100" name="data[Usuario][usuario]"/></td>
        </tr>
        <tr>
            <th>Senha: </th>
            <td><input type="password" class="validateRequired" id="Senha" size="40" maxlength="15" name="data[Usuario][senha]"/></td>
        </tr>
        <tr>
            <th>Nome: </th>
            <td><input type="text" class="validateRequired" id="Nome" size="50" maxlength="100" name="data[Usuario][nome]"/></td>
        </tr>
        <tr>
            <th>Perfil de Acesso:</th>
            <td>
                <table class="interno">
                    <tr>
                        <th><?php __('Descrição'); ?></th>
                        <th><?php __('Menu'); ?></th>
                        <th><?php __('Visualizar'); ?></th>
                        <th><?php __('Inserir'); ?></th>
                        <th><?php __('Alterar'); ?></th>
                        <th><?php __('Excluir'); ?></th>
                    </tr>
                    <?php $i = 0;
                    foreach ($lista_menu as $menu): ?>
                        <tr>
                        <input type="hidden" value="<?php echo $menu['Menu']['id']; ?>" name="data[PerfilAcesso][<?php echo $i; ?>][menu_id]" />
                        <td><a href="#" rel="htmltooltip" class="link_tooltip"><?php echo $menu['Menu']['menu']; ?></a><div class="htmltooltip"><?php echo $menu['Menu']['descricao']; ?></div></td>
                        <th><input type="checkbox" name="data[PerfilAcesso][<?php echo $i; ?>][menu]" value="1" /></th>
                        <th><?php if ($menu['Menu']['visualizar']) { ?><input type="checkbox" name="data[PerfilAcesso][<?php echo $i; ?>][visualizar]" value="1"/><?php } else
                        echo '&nbsp;'; ?></th>
                        <th><?php if ($menu['Menu']['inserir']) { ?><input type="checkbox" name="data[PerfilAcesso][<?php echo $i; ?>][inserir]" value="1"/><?php } else
                        echo '&nbsp;'; ?></th>
                        <th><?php if ($menu['Menu']['alterar']) { ?><input type="checkbox" name="data[PerfilAcesso][<?php echo $i; ?>][alterar]" value="1"/><?php } else
                        echo '&nbsp;'; ?></th>
                        <th><?php if ($menu['Menu']['excluir']) { ?><input type="checkbox" name="data[PerfilAcesso][<?php echo $i; ?>][excluir]" value="1"/><?php } else
            echo '&nbsp;'; ?></th>
            </tr>
    <?php $i++;
endforeach; ?>
    </table>
</td>
</tr>
<tr>
    <td colspan="2" class="nobg">
<?php
$url = "'" . $html->url(array('action' => 'index')) . "'";
echo $form->button(__("Voltar", true), array("class" => "botao", 'onclick' => 'location.href=' . $url, 'type' => 'button'));
?>
        <input type="submit" value="Salvar" class="botao" />
    </td>
</tr>
</table>

</div>